//
//  PlayShareCollectionViewCell.m
//  XYFMApp
//
//  Created by 岁变 on 16/9/14.
//  Copyright © 2016年 岁变. All rights reserved.
//

#import "PlayShareCollectionViewCell.h"
#import "XYMacro.h"

@implementation PlayShareCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
       
        _picImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_picImageView];
        
        _label = [[UILabel alloc] init];
        _label.textColor = [UIColor whiteColor];
        _label.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_label];
    }
    return self;
}


- (void)layoutSubviews {
    [super layoutSubviews];
    
    [_picImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).with.offset(17);
        make.right.equalTo(self.contentView.mas_right).with.offset(-17);
        make.top.equalTo(self.contentView.mas_top).with.offset(0);
        make.height.equalTo(_picImageView.mas_width);
    }];
    
    [_label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).with.offset(0);
        make.right.equalTo(self.contentView.mas_right).with.offset(0);
        make.bottom.equalTo(self.contentView.mas_bottom).with.offset(0);
        make.height.mas_offset(20);
        
    }];
    
}
@end
